package adv324;

/**
 * @author oldliu
 * @since 1.0
 */
public class StrTest2 {
    public static void main(String[] args) {
        String s1="abc";
        String s2="abc";
        System.out.println(s2==s1);
        String s3=s1;
        s1="12345s";
        System.out.println(s3);
        String s4="我love java";
        System.out.println(s4.length()+"是长度！");
        byte[] b = s4.getBytes();
        for (int i = 0; i < b.length; i++) {
            System.out.print(b[i]+" ");
        }
        System.out.println(">>>>>>>>>>比较>>>>>>>>>>>>>>>>>");
        //
        String k1="Java";
        String k2="Java";
        String k3="JAVA";
        System.out.println(k1.equals(k2));
        System.out.println(k1.equals(k3));
        System.out.println(k1.equalsIgnoreCase(k3));

    }
}
